<template>
  <fieldset>
    <legend>父组件</legend>
    <h1>{{ msg }}</h1>
    <Child :v="gift" @rec="get"></Child>
  </fieldset>
</template>

<script>
import Child from "@/components/Child";

export default {
  data() {
    return {
      msg: "父组件属性",
      gift: "父传子",
    };
  },
  components: {
    Child,
  },
  methods: {
    get(input) {
      console.log("子组件传送过来的值===" + input);
    },
  },
};
</script>

<style></style>
